/**
 * 
 */
package com.imonsoft.sqm.web.common;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.imonsoft.common.util.AjaxUtil;
import com.imonsoft.common.util.RequestUtil;

/**
 * 
 * @author LiQianHui
 * @date 2013-04-17
 * @version 2013
 */
@Controller
public class SelectorController {

	protected final Log logger = LogFactory.getLog(getClass());


	@RequestMapping("/test/ajax_test_suggest.do")
	public void testSuggest(HttpServletRequest request, HttpServletResponse response) {
		Map<String, String> params = RequestUtil.getParameterIso2UtfMap(request);
		if (logger.isDebugEnabled()) {
			logger.debug("参数：" + params);
		}
		AjaxUtil.renderJSON(response, "[{id:'china',text:'china中国'},{id:'china',text:'china中国'}]");
	}

	@RequestMapping("/common/selector/user_type_selector.do")
	public void userTypeSelector(HttpServletRequest request, ModelMap model) {
		Map<String, String> params = RequestUtil.getParameterMap(request);
		if (logger.isDebugEnabled()) {
			logger.debug("参数：" + params);
		}

	}
}
